package com.zjitc.bookshop39.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zjitc.bookshop39.entity.Book;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author:徐莹
 * @Date:2025/04/28 13:29:51
 */


public interface BookMapper extends BaseMapper<Book> {
    @Select("SELECT * FROM book")
    List<Book> selectAll();

    @Select("SELECT * FROM book where id=#{id}")
    Book getById(Integer id);
    @Delete("Delete * from book where id=#{id}")
    void delById(Integer id);
}
